import mongoose from "../index";
const xcxAddressSchema = new mongoose.Schema(
    {
        openid: { type: String, required: true, unique: true },
        isDelete: { type: Boolean, required: true, select: false },
        phone: { type: String, required: true },
        name: { type: String, required: true },
        // 详细地址
        details: { type: String, required: true },
        // 省市区
        province: { type: String, required: true },
        city: { type: String, required: true },
        district: { type: String, required: true },
        // 是否默认地址
        isDefault: { type: Boolean, required: true },
    },
    {
        versionKey: false,
        timestamps: true,
    }
)
const xcxAddressModel = mongoose.model('xcxUser', xcxAddressSchema)

export default xcxAddressModel